﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace ResultUC
{
    /// <summary>
    /// Result counter user control
    /// </summary>
    /// <remarks>trungpv@vnext.vn</remarks>
    public partial class Counter : UserControl
    {
        #region Attributs and Getter/Setter
        #endregion
        public Counter()
        {
            InitializeComponent();
        }

        /// <summary>
        /// Update counter from result
        /// </summary>
        /// <param name="isOK"></param>
        public void updateCounter(bool isOK)
        {
            if (isOK)
            {
                tbOK.Text = ((Convert.ToInt32(tbOK.Text)) + 1).ToString();
            }
            else
            {
                tbNG.Text = ((Convert.ToInt32(tbNG.Text)) + 1).ToString();
            }
            tbTotal.Text = ((Convert.ToInt32(tbTotal.Text)) + 1).ToString();
        }
    }
}
